<?php

namespace App\V3\V3_2_7\Controllers;

use App\V3\V3_2_7\Services\LoginLogService;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;

class LoginLogController extends BaseController
{
    /**
     *返回活跃人数和支付信息
     * Author: zlf
     * Created at 2024/8/23 14:15
     * @param Request $request
     * @return JsonResponse
     */
    public function getAccountInfo(Request $request): JsonResponse
    {
        if ($this->getUserId() !== 1) {
            return $this->fail('', '您无权操作！');
        }
        $data = $request->all();
        $data['user_id'] = $this->getUserId();
        $data['main_id'] = $this->getMainUserId();
        return LoginLogService::getAccountInfo($data);
    }
}
